﻿using Adnc.Infra.Entities;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace WYT.Usr.Repository.Entities
{
    /// <summary>
    /// 用户业绩
    /// </summary>
    [Table("usr_UserPerformance"), Comment("用户业绩"), Index(nameof(UserID),nameof(Date))]
    public  class UserPerformance : EfEntity
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Comment("用户ID")]
        public long UserID { get; set; }

        /// <summary>
        /// 当前月份
        /// </summary>
        [Comment("当前月份")]
        public DateTime Date { get; set; }

        /// <summary>
        /// 业绩
        /// </summary>
        [Comment("业绩值"), Column(TypeName = "decimal(18,2)")]
        public decimal Performance { get; set; }

        /// <summary>
        /// 关联订单
        /// </summary>
        [Comment("创建时间")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 关联订单
        /// </summary>
        [Comment("关联订单")]
        public long SourceOrderId { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [Comment("描述"),MaxLength(500)]
        public string? Describe { get; set; }
    }
}
